﻿/*
 * File: BirdEyeViewCamera.cs
 * Author: Gourav Das
 * Purpose: Class for BirdEyeView camera
 * Created: June 2011
 */

using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

//Based on XNA example in MSDN - http://msdn.microsoft.com/en-us/library/bb197901.aspx
namespace _22yards.ThreeD
{
    public class BirdEyeViewCamera : BaseCamera
    {

        public BirdEyeViewCamera(Game game):base(game)
        {
            ResetCamera();
        }

        public override void ResetCamera()
        {
            Position = new Vector3(0f, 1360, -500f);
            rotationMatrix = Matrix.CreateFromYawPitchRoll(0f, 1.08f, 0);
            LookAt = new Vector3(0, 0, 1);
            transformedReference = Vector3.Transform(LookAt, rotationMatrix);
            LookAt = (Position + transformedReference);
            ViewMatrix = Matrix.Identity;
            FOV = 45.0f;
        }

        public void SetFOV(float _fov)
        {
            FOV = _fov;
        }
    }
}
